VERSION=1.6
NAME=Dashflix
DESCRIPTION="Dashflix Widget"

default: widget

widget: Info.plist Default.png Icon.png Dashflix.html Dashflix.css LICENSE
	rm -rf $(NAME).wdgt
	mkdir $(NAME).wdgt
	mkdir $(NAME).wdgt/img
	mkdir $(NAME).wdgt/src
	cp $^ $(NAME).wdgt
	cp common/css/* $(NAME).wdgt/
	cp common/js/* $(NAME).wdgt/src/
	cp common/images/* $(NAME).wdgt/img/
	cp img/* $(NAME).wdgt/img/
	cp src/* $(NAME).wdgt/src/

zip: widget
	zip -r $(NAME)-$(VERSION).zip $(NAME).wdgt

dmg: widget
	hdiutil create -fs HFS+ -srcfolder $(NAME).wdgt -volname $(DESCRIPTION) $(NAME)-$(VERSION).dmg

all: zip dmg

clean:
	rm -rf $(NAME).wdgt
	rm -rf $(NAME)-$(VERSION).zip
	rm -rf $(NAME)-$(VERSION).dmg
